/**
 * Copyright(c) 2014 Xunton Solutions
 *
 * History:
 *   15-3-18 下午1:23 Created by dwzhang
 */
package com.jade.modules.cms;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.MappedSuperclass;

/**
 * 抽象的CMS实体对象，分类、内容、模板都继承该对象。
 *
 * @author <a href="mailto:dwzhang@xunton.com">dwzhang</a> 
 * @version 1.0 15-3-18 下午1:23
 */
//@MappedSuperclass
public abstract class CmsEntity implements Serializable
{
    //所有者类型
    @Column (name = "owner_type", nullable = false, updatable = false, length = 32)
    private String ownerType;
    //所有者
    @Column (name = "owner_id", nullable = false, updatable = false, length = 64)
    private String ownerId;
    //名称
    @Column (name = "name", nullable = false, length = 64)
    private String name;
    //状态，具体实体有自己的定义
    @Column (name = "status", nullable = false)
    private int status;
    //列表中的图片
    @Column (name = "title_image", length = 128)
    private String titleImage;
    //内容中的图片，对于模板来说没有意义
    @Column (name = "content_image", length = 128)
    private String contentImage;
    //排序码
    @Column (name = "sort_code", nullable = false)
    protected int sortCode = 100;
    //说明信息，对于内容来说为摘要信息
    @Column (name = "remark", length = 512)
    private String remark;
    //扩展ID，能够满足一些多级管理的情况
    @Column (name = "fid", length = 64)
    private String fid;
    //创建日期
    @Column (name = "creation_date", nullable = false, updatable = false)
    protected Date creationDate;
    //修改日期
    @Column (name = "update_date")
    protected Date updateDate;

    public String getOwnerType()
    {
        return ownerType;
    }

    public void setOwnerType(String ownerType)
    {
        this.ownerType = ownerType;
    }

    public String getOwnerId()
    {
        return ownerId;
    }

    public void setOwnerId(String ownerId)
    {
        this.ownerId = ownerId;
    }

    public String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    public int getStatus()
    {
        return status;
    }

    public void setStatus(int status)
    {
        this.status = status;
    }

    public String getTitleImage()
    {
        return titleImage;
    }

    public void setTitleImage(String titleImage)
    {
        this.titleImage = titleImage;
    }

    public String getContentImage()
    {
        return contentImage;
    }

    public void setContentImage(String contentImage)
    {
        this.contentImage = contentImage;
    }

    public String getRemark()
    {
        return remark;
    }

    public void setRemark(String remark)
    {
        this.remark = remark;
    }

    public String getFid()
    {
        return fid;
    }

    public void setFid(String fid)
    {
        this.fid = fid;
    }

    public Date getCreationDate()
    {
        return creationDate;
    }

    public void setCreationDate(Date creationDate)
    {
        this.creationDate = creationDate;
    }

    public Date getUpdateDate()
    {
        return updateDate;
    }

    public void setUpdateDate(Date updateDate)
    {
        this.updateDate = updateDate;
    }

    public int getSortCode()
    {
        return sortCode;
    }

    public void setSortCode(int sortCode)
    {
        this.sortCode = sortCode;
    }
}
